package sis.ra.yahoor.result;

import java.util.ArrayList;

import sis.ra.utility.Utils;


public class removeStopWord {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		String file="C:\\dev\\cisservlet\\src\\relation\\yahoor\\result\\stop_words.txt";
		String content=Utils.readFile(file);
		String [] conts=content.split("\n");
		ArrayList<String> stopwords=new ArrayList<String> ();
		for (int i=0;i<conts.length;i++)
		{
			stopwords.add(conts[i]);
		}
		
		String word="C:\\dev\\cisservlet\\src\\relation\\yahoor\\result\\wordlist.txt";
		content=Utils.readFile(word);
		conts=content.split("\n");
		for (int i=0;i<conts.length;i++)
		{
			String term=conts[i].split("\t")[0];
			String freq=conts[i].split("\t")[1];
			if (!stopwords.contains(term)&&term.length()>1&&Integer.parseInt(freq)>1)
				System.out.println(term+"\t"+freq);
		}
	}

}
